package com.c2soft.nepalcmx.services;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;



import com.c2soft.nepalcmx.command.AccountDetailCommand;
import com.c2soft.nepalcmx.command.AccountUserCommand;
import com.c2soft.nepalcmx.command.BrokerFormCommand;
import com.c2soft.nepalcmx.dao.UserFormDAO;

@Service
public class UserFormService {
	
	@Autowired
	private UserFormDAO userFormDAO;

public List<BrokerFormCommand> getUserList(String userId) {
	return userFormDAO.findAllUsers(userId);
}

public List<BrokerFormCommand> getExchangeDetail() {
	return userFormDAO.findExchangeDetail();
}

public void updateService(BrokerFormCommand update ) {
	userFormDAO.savepwdUpdateService(update);
}

public void updateBrokerService(BrokerFormCommand update ) {
	userFormDAO.saveBrokerpwdUpdateService(update);
}

public void updateExchangeService(BrokerFormCommand update ) {
	userFormDAO.saveExchangepwdUpdateService(update);
}

public void updateTransPwdService(BrokerFormCommand update ) {
	userFormDAO.saveTranspwdUpdateService(update);
}

public void updateBrokerTransPwdService(BrokerFormCommand update ) {
	userFormDAO.saveBrokerTranspwdUpdateService(update);
}

public void updateExchangeTransPwdService(BrokerFormCommand update ) {
	userFormDAO.saveExchangeTranspwdUpdateService(update);
}

public void updateUserService(BrokerFormCommand user) {
	userFormDAO.updateUserDetailService(user);
}

public void updateBrokerAccount(BrokerFormCommand user) {
	
	userFormDAO.updateBrokerAccountService(user);
}
public void updateUserAccount(BrokerFormCommand user) {
	userFormDAO.updateUserAccountService(user);
}

public List<AccountUserCommand> getUsersDetail(String userId) {
	return userFormDAO.findUserDetail(userId);
}

public List<AccountUserCommand> getBrokersDetail(String userId) {
	return userFormDAO.findBrokerDetail(userId);
}

public List<BrokerFormCommand> getRMSReportForUser(String userId) {
	return userFormDAO.findRMSReportForUser(userId);
}

public List<BrokerFormCommand> getRMSReportForBroker(String brokerId) {
	return userFormDAO.findRMSReportForBroker(brokerId);
}

public void postRMSNotificationForUser(BrokerFormCommand user){
	userFormDAO.postRMSNotification(user);
}

public void postRMSNotificationForBroker(BrokerFormCommand broker){
	userFormDAO.postBrokerRMSNotification(broker);
}

public void updateStatus(String id){
	userFormDAO.updateStatusUser(id);
}

public List<BrokerFormCommand> updateStatus1(String userId){
	return userFormDAO.updateStatusUser1(userId);
}

public List<BrokerFormCommand> updateStatusBroker1(String brokerId){
	return userFormDAO.updateStatusForBroker1(brokerId);
}

public void forgetPwdService(BrokerFormCommand forgetPwd) {
	userFormDAO.forgetPassword(forgetPwd);
}
}
